import { defineConfig, presetAttributify, presetUno } from "unocss"

export default defineConfig({
  /** 预设 */
  presets: [
    /** 属性化模式 & 无值的属性模式 */
    presetAttributify(),
    /** 默认预设 */
    presetUno()
  ],
  /** 自定义规则 */
  rules: [
    ["uno-padding-20", { padding: "20px" }],
    ["uno-avatar-bg-color", { "background-color": "var(--v3-custom-avatar-bg-color)" }]
  ],
  /** 自定义快捷方式 */
  shortcuts: {
    "uno-wh-full": "w-full h-full",
    "uno-flex-center": "flex justify-center items-center",
    "uno-flex-x-center": "flex justify-center",
    "uno-flex-y-center": "flex items-center",
    "uno-absolute-center": "absolute top-50% left-50% translate--50%"
  },
  theme: {
    breakpoints: {
      sm: "640px",
      md: "768px",
      lg: "1024px",
      xl: "1280px",
      "2xl": "1536px"
    }
  }
})
